package priv.cwr.springboot.demo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import priv.cwr.springboot.demo.model.db.DeptEntity;

/**
 * User: R
 * Date: 2018/8/30
 * Time: 9:20
 * Created with IntelliJ IDEA.
 */
@Mapper
@Repository
public interface DeptMapper extends BaseMapper<DeptEntity> {
    /**
     * 查询所有子部门id(逗号分隔返回)
     *
     * @param id 部门id
     * @return
     */
    @Select("SELECT findChildDept(#{id})")
    String findChildDept(Long id);
}
